from openai import OpenAI

client = OpenAI(
    base_url='http://localhost:11434/v1/',

    # required but ignored
    api_key='ollama',
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            'role': 'user',
            'content': 'Say this is a test',
        }
    ],
    model='qwen3:32b-q8_0',
)
print(chat_completion)

# response = client.chat.completions.create(
#     model="llava",
#     messages=[
#         {
#             "role": "user",
#             "content": [
#                 {"type": "text", "text": "What's in this image?"},
#                 {
#                     "type": "image_url",
#                     "image_url": "",
#                 },
#             ],
#         }
#     ],
#     max_tokens=300,
# )

# completion = client.completions.create(
#     model="llama3.2",
#     prompt="Say this is a test",
# )

# list_completion = client.models.list()

# model = client.models.retrieve("llama3.2")

# embeddings = client.embeddings.create(
#     model="all-minilm",
#     input=["why is the sky blue?", "why is the grass green?"],
# )